x86emul: don't unconditionally clear segment bases upon null selector loads
authorJan Beulich <jbeulich@suse.com>
Wed, 21 Dec 2016 15:58:20 +0000 (16:58 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 21 Dec 2016 15:58:20 +0000 (16:58 +0100)
commitbd755bf9170ef10e1c14ee4ba8399a5153debf21
tree033e9b1fc6a20e259b203d8b778c5355f4962c81
parent3c52e84b26dad16380a7a08160aa119327ff2ffb
x86emul: don't unconditionally clear segment bases upon null selector loads

AMD explicitly documents that namely FS and GS don't have their bases
cleared in that case, and I see no reason why guests may not rely on
that behavior. To facilitate this a new input field (the CPU vendor) is
being added.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/tests/x86_emulator/test_x86_emulator.c
tools/tests/x86_emulator/x86_emulate.h
xen/arch/x86/hvm/emulate.c
xen/arch/x86/mm.c
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/traps.c
xen/arch/x86/x86_emulate/x86_emulate.c
xen/arch/x86/x86_emulate/x86_emulate.h